{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 推測統計の基本"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-03-06T03:37:40.696920Z",
     "start_time": "2018-03-06T03:37:40.690655Z"
    }
   },
   "source": [
    "## 母集団と標本"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 標本の抽出方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-18T08:14:56.358857Z",
     "start_time": "2018-08-18T08:14:56.124816Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "%precision 3\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-18T08:15:59.206470Z",
     "start_time": "2018-08-18T08:15:59.202081Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([76, 55, 80, 80, 74, 61, 81, 76, 23, 80])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('../data/ch4_scores400.csv')\n",
    "scores = np.array(df['点数'])\n",
    "scores[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.710063Z",
     "start_time": "2018-08-14T06:47:18.706621Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2, 3, 3])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.choice([1, 2, 3], 3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.714348Z",
     "start_time": "2018-08-14T06:47:18.711029Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 1, 2])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.choice([1, 2, 3], 3, replace=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.718669Z",
     "start_time": "2018-08-14T06:47:18.715323Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 1])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(0)\n",
    "np.random.choice([1, 2, 3], 3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.722968Z",
     "start_time": "2018-08-14T06:47:18.719676Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "70.400"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(0)\n",
    "sample = np.random.choice(scores, 20)\n",
    "\n",
    "sample.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.726978Z",
     "start_time": "2018-08-14T06:47:18.724063Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "69.530"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scores.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.731373Z",
     "start_time": "2018-08-14T06:47:18.727854Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1回目の無作為抽出で得た標本平均 72.45\n",
      "2回目の無作為抽出で得た標本平均 63.7\n",
      "3回目の無作為抽出で得た標本平均 66.05\n",
      "4回目の無作為抽出で得た標本平均 71.7\n",
      "5回目の無作為抽出で得た標本平均 74.15\n"
     ]
    }
   ],
   "source": [
    "for i in range(5):\n",
    "    sample = np.random.choice(scores, 20)\n",
    "    print(f'{i+1}回目の無作為抽出で得た標本平均', sample.mean())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 確率モデル"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 確率の基本"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-03-06T10:06:25.135659Z",
     "start_time": "2018-03-06T10:06:25.129307Z"
    }
   },
   "source": [
    "### 確率分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.735390Z",
     "start_time": "2018-08-14T06:47:18.732292Z"
    }
   },
   "outputs": [],
   "source": [
    "dice = [1, 2, 3, 4, 5, 6]\n",
    "prob = [1/21, 2/21, 3/21, 4/21, 5/21, 6/21]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.740013Z",
     "start_time": "2018-08-14T06:47:18.736262Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.choice(dice, p=prob)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.744199Z",
     "start_time": "2018-08-14T06:47:18.741030Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 6, 4, 5, 5, 6, 6, 3, 5, 6, 5, 6, 6, 2, 3, 1, 6, 5, 6, 3, 4, 5, 3,\n",
       "       4, 3, 5, 5, 4, 4, 6, 4, 6, 5, 6, 5, 4, 6, 2, 6, 4, 5, 3, 4, 6, 5, 5,\n",
       "       5, 3, 4, 5, 4, 4, 6, 4, 4, 6, 6, 2, 2, 4, 5, 1, 6, 4, 3, 2, 2, 6, 3,\n",
       "       5, 4, 2, 4, 4, 6, 6, 1, 5, 3, 6, 6, 4, 2, 1, 6, 4, 4, 2, 4, 1, 3, 6,\n",
       "       6, 6, 4, 5, 4, 3, 3, 4])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "num_trial = 100\n",
    "sample = np.random.choice(dice, num_trial, p=prob)\n",
    "sample"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.752137Z",
     "start_time": "2018-08-14T06:47:18.745175Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>度数</th>\n",
       "      <th>相対度数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>出目</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5</td>\n",
       "      <td>0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>9</td>\n",
       "      <td>0.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>13</td>\n",
       "      <td>0.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>27</td>\n",
       "      <td>0.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>19</td>\n",
       "      <td>0.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>27</td>\n",
       "      <td>0.27</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    度数  相対度数\n",
       "出目          \n",
       "1    5  0.05\n",
       "2    9  0.09\n",
       "3   13  0.13\n",
       "4   27  0.27\n",
       "5   19  0.19\n",
       "6   27  0.27"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "freq, _ = np.histogram(sample, bins=6, range=(1, 7))\n",
    "pd.DataFrame({'度数':freq,\n",
    "              '相対度数':freq / num_trial},\n",
    "              index = pd.Index(np.arange(1, 7), name='出目'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.839357Z",
     "start_time": "2018-08-14T06:47:18.753130Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmcAAAF1CAYAAACtRE0cAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGeNJREFUeJzt3X+wpXddH/D3p0Z3hdikGCKyVJYGraDEYNZm0Uhw4g9qtBiidnAcutB0o3ScUrVjqu2UpiPFdhilrZImAhec0k6pBn+gkiEmwBYS88tIEgxGcwOY1pKtrpJ2g0w//eOc1bvr3b2XcJ4933vv6zVz557nud/vuZ/zPWfvvPf7PM/3qe4OAABj+CvLLgAAgL8gnAEADEQ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U5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure(figsize=(10, 6))\n",
    "ax = fig.add_subplot(111)\n",
    "ax.hist(sample, bins=6, range=(1, 7), density=True, rwidth=0.8)\n",
    "# 真の確率分布を横線で表示\n",
    "ax.hlines(prob, np.arange(1, 7), np.arange(2, 8), colors='gray')\n",
    "# 棒グラフの[1.5, 2.5, ..., 6.5]の場所に目盛りをつける\n",
    "ax.set_xticks(np.linspace(1.5, 6.5, 6))\n",
    "# 目盛りの値は[1, 2, 3, 4, 5, 6]\n",
    "ax.set_xticklabels(np.arange(1, 7))\n",
    "ax.set_xlabel('出目')\n",
    "ax.set_ylabel('相対度数')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:18.937910Z",
     "start_time": "2018-08-14T06:47:18.840450Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmcAAAF1CAYAAACtRE0cAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGetJREFUeJzt3X+w5WddH/D3R6O7QmxShIgslcWgFZQYzFoWjQQn/qBGixC1g+PQhaabSscpVTum2k5pOlK0wyhtlTQRuOCUdko1+CMqGWICbCExv4wkwWAkN4Cplmx1lbQbZPrpH+esvbve3XsTznfPc+99vWbu3PM953nO/Zznbi5vnu/3+zzV3QEAYAyfs+wCAAD4/4QzAICBCGcAAAMRzgAABiKcAQAMRDgDABjIJOGsZq6pqjuq6sqTtHl6Vd1YVYeq6per6omb6QcAsJ1NNXO2P8nuJPuSHKyqp63T5olJLuvuC5P8zyRfv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8vu5Zt4swkb+nuC+df9y+7oK2sqp6e5Nnd/XVJ7kjyLUsuaUsRzraB7v61JK7lW5y7MttGLEk+kwEWUNzquvsTSR6tqtsz+yP9S0suaTt4Q5IfSvJ/l13INnFmkr9dVf+9qt5lxvyz9s1JjlTV9ZktkfXuJdezpQhncILu/lB3f6KqvivJWd39gWXXtB10933dfWyLtpdu1J6Tq6p/kOT6Y3e/sxAPZ7as0zdk9n/QvnfJ9Wx1T03yN7r7W5P8WWaLzbNJwhmso6q+P8mFSX5g2bVsB1X1zKp6yvzwV5J80zLr2QZekuSVVXVTkudU1RuWXM+W1913dfeb5oe3ZLZbDY/fp5K8d/74vZktOs8muUAPTlBVz0hyaXeb3Vmc5yd5dpJ/meRrs/6WbmxSd3/HscdVdXN3//Ay69kOqurlmc2UX5Vkf2Z7PvP4fTCzbRiT2X/zrot+DMycwV/195M8d81dW69YdkHbwC8meWZVvS/JdyS5asn1wImuTfLtVXVzkr+Z5J1LrmdL6+7bkzxUVR9M8qwk/23JJW0p1jkDABiImTMAgIEIZwAAAxHOAAAGIpwBAAxEOAMAGIh1zoAdq6oOJEl3r5zw/Fcn+ZmTdPvh7r5r2sqAnUw4A3aUqnpNkt/r7t884fnvT3LGPKidneRQd7/2hDavTfLXT0+lwE7ltCYAwEDMnAE70aur6juSfGWSVNW+JF+R5B1r2hyoqhed0G9vkptOQ33ADiacATvN7yb5QJKPJPm++XPvSHJ+kkfXtFs5yWlNgEkJZ8BO84zufmuSVNX/TpLu/tMkN1XVKzPbsDlJXlFVF57Q98ti5gyYmGvOgJ3m727ytbd39zev/Ury9olrAzBzBuw4X1xV75k//pLkL+/UTJJda9qZOQOWQjgDdpo/7u4Xr/dCVa1dXuPtrjkDlqG6e9k1AAAw55ozAICBCGcAAAMRzgAABiKcAQAMRDgDABiIcAYAMJD/B9Y31RA1EjmBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "num_trial = 10000\n",
    "sample = np.random.choice(dice, size=num_trial, p=prob)\n",
    "\n",
    "fig = plt.figure(figsize=(10, 6))\n",
    "ax = fig.add_subplot(111)\n",
    "ax.hist(sample, bins=6, range=(1, 7), density=True, rwidth=0.8)\n",
    "ax.hlines(prob, np.arange(1, 7), np.arange(2, 8), colors='gray')\n",
    "ax.set_xticks(np.linspace(1.5, 6.5, 6))\n",
    "ax.set_xticklabels(np.arange(1, 7))\n",
    "ax.set_xlabel('出目')\n",
    "ax.set_ylabel('相対度数')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 推測統計における確率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:19.099892Z",
     "start_time": "2018-08-14T06:47:18.939207Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAF1CAYAAABoNteNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X+UX3V95/HnW6KDChIhwgi4DgSsJscRJErUbJIupdYC7ZL4c4/dVZdO2MN6Ki4eo57uqVhRS92CPwoNq4I9ZUWqsdrUn2miBk3ML9AEBHNkIhjsmkHjmi3Bte/9494pk5nvdyZ8M/c785l5Ps7hzNz7/dz7/dz3fL83Lz73+72fyEwkSZJUjidMdQckSZL0+BjgJEmSCmOAkyRJKowBTpIkqTAGOEmSpMIY4CRJkgpjgJMkSSqMAU6SJKkwBjhJkqTCGOAkSZIKM2eqOzDZTjzxxDzzzDOnuhvTzqOPPsqTnvSkqe7GtGNdxrImrVmX1qxLa9ZlLGvS2vbt2/dn5jMe73YzLsCdfvrpbNu2ba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OEmSpMIY4CRplIj4k4hY3mL9WyLisoj4vYi4MiKOiYhPTEEXJc1yc6a6A5I0TV0XET+vf/9lZl5MNTfhHKr5C78LnA2cHBEX1+121jMUSFKjDHCS1NpbMnPj8EJEvBL4TeBc4EfAbwNfo5p8+t9RTbd1BWCAk9Q4Z2KQJKC+ZPpXwAOjHnoWsAr4FnAVcA7wRKppgl4BfAB4EnBmZt7Yrf5Kmt0cgZOkx9yQmdeNXBERb6l/fSnwVeDpwM3A/6UKcxcAD1PNXyhJXeEInCQBEbEMuAkYPcH2qcAfAqcBbweeAvwz1ajba4E/qn9/fXpCldQljsBJUuX7wH8D7geGgBcD3wReAzyUmV+PiAuBL1B93u1TmbkrIrYAb6IKcYempOeSZh1H4CQJiIibgFuB04HjqL6c8GzgNuBvqb6o8GTgs8AZwBvrTQfq7VYBb8jMf+puzyXNRt4HTtKsFxFPA/53Zm6g+ixbUo20PZiZDwDvBuYCNwAfBxYCPcCrqULb54APAQumoPuSZiFH4CRJkgrjCJwkSVJhDHCSJEmFMcBJkiQVxgAnSZJUGAOcJElSYf4/wFNyXmwup2cAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure(figsize=(10, 6))\n",
    "ax = fig.add_subplot(111)\n",
    "ax.hist(scores, bins=100, range=(0, 100), density=True)\n",
    "ax.set_xlim(20, 100)\n",
    "ax.set_ylim(0, 0.042)\n",
    "ax.set_xlabel('点数')\n",
    "ax.set_ylabel('相対度数')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:19.103313Z",
     "start_time": "2018-08-14T06:47:19.100842Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "89"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.choice(scores)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:19.265020Z",
     "start_time": "2018-08-14T06:47:19.104243Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAF1CAYAAABoNteNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X+cXXV95/HXp6CDCiYlEaaI60BgW8M6gokSNZukpdbaaLsk/tyH7aqlE/fh+qi6dEVd+wMr4rpu/VErhqpgH6Ug1VgVFTVN1KCJJEE0gYJ5yKAY7ZpB45otwW0/+8c5UyYz995JJnPuzPfe1/Px8DFz7v2eO9/zyb2Xt99zzvcbmYkkSZLK8XNz3QFJkiQdGwOcJElSYQxwkiRJhTHASZIkFcYAJ0mSVBgDnCRJUmEMcJIkSYUxwEmSJBXGACdJklQYA5wkSVJhTpzrDsy2U089Nc8+++y57sa88+CDD/Lwhz98rrsx71iXqaxJa9alNevSmnWZypq0tmvXrgOZ+Zhj3a/nAtyZZ57Jzp0757ob887o6ChDQ0Nz3Y15x7pMZU1a6/W6DF12U9vnRq9c2/65Hq/LTFmXqaxJaxFx70z28xSqJElSYQxwkiRJhTHASZIkFcYAJ0mSVBgDnCRJUmEMcJIkSYUxwEmSJBXGACdJklQYA5wkSVJhGglwUbk6InZHxOVt2gxExKaIuC0iNkx67s8j4vr691MjYnNEfD0inttEfyVJkkrS1AjcCuAkYDkwEhFntGizDtgDrAGuiIgBgIh4JvDoCe02ANcBLwHe3lB/JUmSitFUgFsGbAGGgW3ABR3arAC2A+dExELglcCbW7RbCtwfEY9qqM+SJElFaCrALQAOAKcBW+vtdm0SuLPefjtwGfCzFu1+BOxv81qSJEl948SG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OOADcBXgEuB84GHUS0T9GzgbcDDgbMz86pu9VdSf3METpIe8r7MfOfEByLi1fWvTwc+D/w8cA3wf6nC3EXA/VTrF0pSVzgCJ0lARKwGrgYmL7B9BvB7wGOB1wGPBP6JatTtRcDv17+/JP1CldQljsBJUuUfgP8K3AOMAU8Fvgy8EPh+Zn4xIp4JfJLqerfrM3NPROwAXk4V4g7PSc8l9R1H4CQJiIirgeuAM4GTqW5OeDxwA/C3VDcqPAL4GHAW8LJ615F6vw3ASzPzH7vbc0n9yHngJPW9iHg08L8zcwvVtWxJNdJ2X2Z+F/gTYCHwPuCDwHnAAPACqtD2ceDdwNI56L6kPuQInCRJUmEcgZMkSSqMAU6SJKkwBjhJkqTCGOAkSZIKY4CTJEkqzP8HHAjU3xgpTwAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sample = np.random.choice(scores, 10000)\n",
    "\n",
    "fig = plt.figure(figsize=(10, 6))\n",
    "ax = fig.add_subplot(111)\n",
    "ax.hist(sample, bins=100, range=(0, 100), density=True)\n",
    "ax.set_xlim(20, 100)\n",
    "ax.set_ylim(0, 0.042)\n",
    "ax.set_xlabel('点数')\n",
    "ax.set_ylabel('相対度数')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-08-14T06:47:19.591784Z",
     "start_time": "2018-08-14T06:47:19.266201Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAF1CAYAAACzjX2vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAG35JREFUeJzt3X+QXWd93/H3NwivI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R6reljaf328vrr5cBv4Fw5ZXxfHnG+ALAOeG/9/dVU82PK82VOhTSqraR+LiJ2U21S+n4m335qvuvsyR0dx7f1s7h+ycx9wNGIuBe4EOcK0LMvzpcfuJpqZxSY2tZ2bTC+J52vNW2dK/8FuKb+G3od8EGcK9Ddlw/gfIHq82fn1X15mOpzaFOeL97MVpIkqUBzbSVNkiSpFQxpkiRJBTKkSZIkFciQJkmSVCBDmiRJUoEMaZIkSQUypElqtYh4d0Ss6/H4dRGxMSJ+PiJ+NSKeFhEf70OJklpqQb8LkKQC3BwR36m//15mXk21p94Cqj32/gy4CFgWEVfX4w7UuxNIUiMMaZIE12XmzlMHEfF64KeBS4DHgFcDX6baGPlnqLbUejtgSJPUGHcckNQ69dubHwEe7/jR84FNwNeBdwArgadTbe3yWuB9wDnABZl5y2zVK6mdXEmT1FYfzsybxz8QEdfV374c+BLwI8A24P9QBbYrgb+l2ttTkhrlSpqk1omItcBWoHNz4+XAvwWeB7wTeCbwD1SrZ28CfqX+/l+lL56SGuZKmqQ2egj498ARYAx4GfA14I3AX2TmVyPiVcAdVJ8/+3RmHoyIPcBbqILayb5ULqk1XEmT1DoRsRX4FHA+8CyqCwL+KfAHwB9RXRzwDOAzwI8Bb65PHanP2wRcm5l/NbuVS2oT75MmqVUi4lzgrzNzB9Vny5Jqxexbmfk48B5gMfBh4GPAi4EB4A1Uwex24IPAxX0oX1KLuJImSZJUIFfSJEmSCmRIkyRJKpAhTZIkqUCGNEmSpAIZ0iRJkgr0/wGRdQ3uiZhDEwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sample_means = [np.random.choice(scores, 20).mean()\n",
    "                for _ in range(10000)]\n",
    "\n",
    "fig = plt.figure(figsize=(10, 6))\n",
    "ax = fig.add_subplot(111)\n",
    "ax.hist(sample_means, bins=100, range=(0, 100), density=True)\n",
    "# 母平均を縦線で表示\n",
    "ax.vlines(np.mean(scores), 0, 1, 'gray')\n",
    "ax.set_xlim(50, 90)\n",
    "ax.set_ylim(0, 0.13)\n",
    "ax.set_xlabel('点数')\n",
    "ax.set_ylabel('相対度数')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## これから学ぶこと"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": "block",
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
